package Collection;

import java.util.ArrayList;
import java.util.List;
import java.util.Random;

/**
 *
 */
public class Test2 {
    public static void main(String[] args) {
        List<Integer> list = new ArrayList<>();
        Random rand = new Random();
        for (int i =0;i<5;i++){
            list.add(rand.nextInt(101));
        }
        System.out.println(list);

        System.out.println(list.stream().allMatch(i->i>=60));

        int sum = list.stream().reduce((e1, e2) ->(e1+e2 )).get();
        System.out.println("总分:"+sum);
    }
}
